// vite.config.ts
import { defineConfig } from "file:///D:/Projects/dongliang-web/node_modules/vite/dist/node/index.js";
import react from "file:///D:/Projects/dongliang-web/node_modules/@vitejs/plugin-react/dist/index.mjs";
import { resolve } from "path";
import { createSvgIconsPlugin } from "file:///D:/Projects/dongliang-web/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import unocss from "file:///D:/Projects/dongliang-web/node_modules/unocss/dist/vite.mjs";
var __vite_injected_original_dirname = "D:\\Projects\\dongliang-web";
var vite_config_default = defineConfig({
  plugins: [
    react(),
    unocss(),
    createSvgIconsPlugin({
      iconDirs: [resolve(process.cwd(), "src/assets/icons")],
      symbolId: "icon-[dir]-[name]"
    })
  ],
  server: {
    proxy: {
      "/api": {
        target: "https://mock.mengxuegu.com",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, "")
      }
    }
  },
  resolve: {
    alias: {
      "@": resolve(__vite_injected_original_dirname, "src"),
      "#": resolve(__vite_injected_original_dirname, "types")
    },
    extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json"]
  },
  server: {
    port: 9529
  },
  build: {
    // target: "es2015", // 现代浏览器支持
    chunkSizeWarningLimit: 1500,
    // 提高块大小警告阈值
    polyfillModulePreload: false,
    // 禁用传统 polyfill
    cssCodeSplit: true,
    // CSS 代码分割
    terserOptions: {
      compress: {
        drop_console: true,
        // 移除 console
        drop_debugger: true
        // 移除 debugger
      }
    },
    rollupOptions: {
      output: {
        manualChunks(id) {
          if (id.includes("node_modules")) {
            return "vendor";
          }
        }
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxQcm9qZWN0c1xcXFxkb25nbGlhbmctd2ViXCI7Y29uc3QgX192aXR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